﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Iacym.Entities;

namespace Iacym.Repository
{
    public class TelefonoRepository:MasterRepository,ITelefonoRepository
    {
        public List<TELEFONO> GetAllFromTelefono()
        {
            var query = from c in context.TELEFONOS
                        select c;
            return query.ToList();
        }

        public List<TELEFONO> GetFromTelefonoByPersona(int id)
        {
            var query = from c in context.TELEFONOS.Include("LINEA_TELEFONICA")
                        where c.Dni.Equals(id)
                        select c;
            return query.ToList();
        }
    }
}
